<?php

namespace app\index\traits;


/**
 *
 * Trait SourceTrait
 * @package app\index\traits
 */
trait SourceTrait
{

    /**
     * @param $source
     * @return mixed
     */
    private function wrapSource($source)
    {
        // $is_buy = $this->getTradeDao()->isBuySource($memberId, $sourceId);
        $is_buy = $source['is_buy'] ?? false;

        if (!$is_buy) {

            $source['mobile'] = substr_replace($source['mobile'] ?? '', '****', 3, 4);
        }

        return $source;
    }

}